<?php

/**
 * user form base class.
 *
 * @method user getObject() Returns the current form's model object
 *
 * @package    jobbit
 * @subpackage form
 * @author     Your name here
 * @version    SVN: $Id: sfDoctrineFormGeneratedTemplate.php 29553 2010-05-20 14:33:00Z Kris.Wallsmith $
 */
abstract class BaseloginForm extends BaseFormDoctrine
{
	
	public function setup()
	{
		$this->setWidgets(array ('login' => new sfWidgetFormInputText(), 'password' => new sfWidgetFormInputPassword() ));
		
		$this->setValidators(array ('login' => new sfValidatorString(array ('max_length' => 255 )), 'password' => new sfValidatorCallback(array ('callback' => array ($this, 'checkPassword' ) )) ));
		
		$this->widgetSchema->setNameFormat('login[%s]');
		
		$this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);
		
		$this->setupInheritance();
		
		parent::setup();
	}
	
	public function getModelName()
	{
		return 'user';
	}
	
	public function save($con = null)
	{
		return $this->getObject();
	}
	
	public function setObject($object)
	{
		$this->object = $object;
	}
}
